App = Ember.Application.create();

//App.ApplicationAdapter = DS.FixtureAdapter;

App.User = DS.Model.extend({
  first:  DS.attr(),
  last:   DS.attr(), 
  phone:  DS.attr()
});

App.Contact.FIXTURES = [
  { id: 1, first: 'Troy', last:  'Scott', phone: '(778) 988 1040'}, 
  { id: 2, first: 'Chie', last:   'Scott', phone: '(444) 444 4444'}
]

// Router
App.Router.map(function() {
  this.resource('contacts', function() {
    this.resource('contact', { path: '/user_id' }, function() {
      this.route('edit');
    });
    this.route('create');    
  }); // contacts 
 }); // router
  
  // Users
  App.UsersRoute = Ember.Route.extend({
    model: function() {
      return this.store.find('contacts');
    }  
  });
  
  App.UsersController = Ember.ArrayController.extend({
    sortProperties: ['first'],
    sortAscending: true });
 